/**
 * Sep 6, 2012 1:42:55 PM
 * com.kratonsolution.cbs.common
 * StringHelper.java
 */
package com.kratonsolution.belian.common.util;

import java.io.Serializable;

/**
 * @author Agung Dodi Perdana
 * @email agung.dodi.perdana@gmail.com
 * @Version Sinch 0.0.1
 */
public class Strings implements Serializable
{
    private static final long serialVersionUID = -2093150877748036774L;

    public static final String safe(Object stringObject)
    {
        if(stringObject == null)
            return "";
        
        return stringObject.toString();
    }
    
    public static final boolean isNullOrEmpty(String string)
    {
        return com.google.common.base.Strings.isNullOrEmpty(string);
    }
    
    public static final String cannotEmpty(Object object)
    {
        if(object != null || object instanceof String)
            return object.toString();
        
        return null;
    }
    
    public static final boolean notEmpty(Object object)
    {
        if(object != null || object instanceof String)
            return true;
        
        return false;
    }
}
